/**
 * 2018年4月26日下午7:27:33
 */
package com.an.framework.springtest.async;

import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

import com.sun.xml.internal.ws.developer.Serialization;

/**

 * @目的：异步方法类
 * 
 * @author 86171
 * @date 2018年4月26日下午7:27:33
 * 
 */
@Async
@Service
public class MyAsyncService {

	public void test(String name) {
		try {
			Thread.sleep(2000);
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		System.out.println("test当前线程名字：" + Thread.currentThread().getName() + ",方法参数：" + name);
	}
	
	public void test2(String name) {
		System.out.println("test2当前线程名字：" + Thread.currentThread().getName() + ",方法参数：" + name);
	}
}
